﻿Namespace GestionCalculs

    ''' <summary>
    ''' Etat du processus de calcul
    ''' </summary>
    ''' <remarks></remarks>
    Public Class EtatCalcul
        Inherits BaseNotifyPropertyChangeComponentModel

#Region "Variables de classe"
        ''' <summary>
        ''' Valeur de l'état du calcul
        ''' </summary>
        ''' <remarks></remarks>
        Protected _value As ValueEtatCalcul
#End Region

#Region "Constructeur"

        ''' <summary>
        ''' Contructeur par défaut
        ''' </summary>
        ''' <remarks>Valeur de l'état de calcul est NON_INITIALISE</remarks>
        Public Sub New()
            _value = ValueEtatCalcul.NON_INITIALISE
        End Sub

        ''' <summary>
        ''' Contructeur
        ''' </summary>
        ''' <param name="etat">Etat Initial</param>
        ''' <remarks></remarks>
        Public Sub New(ByVal etat As ValueEtatCalcul)
            _value = etat
        End Sub

#End Region

#Region "Propriétés"
        ''' <summary>
        ''' Valeur de l'état de calcul
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property Value() As ValueEtatCalcul
            Get
                Return _value
            End Get
            Set(ByVal value As ValueEtatCalcul)
                If value <> _value Then
                    OnPropertyChanging("Value")
                    _value = value
                    RaiseEvent ValueChanged(Me, New EventArgs)
                    OnPropertyChanged("Value")
                End If
            End Set
        End Property
        Public Event ValueChanged As EventHandler
#End Region

    End Class

End Namespace
